import react from "@vitejs/plugin-react-swc";
import * as path from "path";
import { defineConfig } from "vite";

// https://vitejs.dev/config/
export default defineConfig({
  server: {
    // https: true,
    host: "0.0.0.0",
    proxy: {
      "/api": {
        secure: false,
        target: "https://ardev.ai-edu.sensetime.com",
        // target: "https://artesting.ai-edu.sensetime.com",
        // target: "http://10.156.18.137:8082",
        changeOrigin: true,
        // rewrite: (path) => path.replace(/^\/api/, ""),
      },
    },
  },
  plugins: [react()],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "src"),
    },
  },
});
